package homework02;

public class Cat extends Animal{

    public Cat(String name) {
        super(name);
    }

    @Override
    public String makeSound() {
        return "喵喵";
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Cat)) return false;
        Cat cat = (Cat) o;
        return getName().equals(cat.getName());
    }

    @Override
    public String toString() {
        return "Cat{" +
                "name='" + getName() + '\'' +
                '}';
    }
}
